package ModelLayer;
import java.util.ArrayList;

/**
 * This class is the suborder class and contains a product and a quantity.
 * 
 * @author Gruppe 4 
 * @version 5. juni 2012
 */
public class SubOrder
{
    // Instance variables
    private Product product;
    private int quantity;
    private int missingProducts;
    private ArrayList<Integer> missingProductsComposite;
    private int discount;

    /**
     * The constructor of this class takes input parameters.
     * And initializes the rest of the variables.
     */
    public SubOrder(Product product, int quantity)
    {
        this.product = product;
        this.quantity = quantity;
        missingProducts = 0;
        discount = 0;
        missingProductsComposite = new ArrayList<Integer>();
    }

    /**
     * Set and get methods.
     */
    public Product getProduct()
    {
        return product;
    }
    
    public int getQuantity()
    {
        return quantity;
    }
    
    public int getDiscount()
    {
        return discount;
    }
    
    public int getMissingProduct()
    {
        return missingProducts;
    }
    
    public ArrayList<Integer> getMissingProductsComposite()
    {
        return missingProductsComposite;
    }
    
    public void setMissingProductsComposite(ArrayList<Integer> missing) 
    {
        missingProductsComposite = missing;
    }
    
    public void setDiscount(int discount)
    {
        this.discount = discount;
    }
    
    public void setMissingProducts(int missingProducts)
    {
        this.missingProducts = missingProducts;
    }
}